home *** CD-ROM | disk | FTP | other *** search
- Path: fido.asd.sgi.com!austern
- From: "Nathan Myers, http://www.cantrip.org/" <ncm@cantrip.org>
- Newsgroups: comp.std.c++
- Subject: Re: string::npos is unhandy and dangerous
- Date: 06 Apr 1996 11:33:01 PST
- Organization: The Cantrip Cooperative
- Approved: austern@isolde.mti.sgi.com
- Message-ID: <3164B306.7B53B7FB@cantrip.org>
- References: <news:4k06dh$kni@penguin.doc.ic.ac.uk> <4k1s4j$jk0@bmtlh10.bnr.ca>
- NNTP-Posting-Host: isolde.mti.sgi.com
- X-Original-Date: Thu, 04 Apr 1996 21:43:34 -0800
- X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i386)
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBVAwUBMWbG7ky4NqrwXLNJAQErDQIAqTlC6BrT7lELem5f9tgXtHWvaXapTBNu
- L4B1njMtm5M3e6CNN3UCbO5JIE443/lQhu9k5ziAL9W5gXKJKDktZA==
- =ik3c
- Originator: austern@isolde.mti.sgi.com
-
- john (j.d.) hickin <hickin@nortel.ca> wrote:
- >
- > The basic problem has been already been noted raised by Mr. Kanze. Because
- > the basic_string contains the following declaration:
- >
- > static const size_type npos = -1;
- >
- > it is evident that there is a constraint that size_type must be something thay
- > can be constructed from an integral type. I can't quite recall the wording of
- > the original post but it was made clear that size_type cannot be arbitrary.
-
- This is very astute. The question of how npos should specified
- is still up for discussion, for just the reason John mentioned.
- Clearly, the standard must not constrain allocators in this way
- just allow the basic_string template to be described more conveniently.
-
- Nathan Myers
- ncm@cantrip.org
- ---
- [ comp.std.c++ is moderated. To submit articles: Try just posting with your
- newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
- comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
- Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
- Comments? mailto:std-c++-request@ncar.ucar.edu
- ]
-